import Vue from 'vue';
import Vuex from 'vuex';
import { deviceStore } from '@/store/modules/device';
import { systemStore } from '@/store/modules/system';

Vue.use(Vuex);

const store = new Vuex.Store({
  modules: {
    device: deviceStore,
    system: systemStore,
  }
});

export default store;

if (process.env.NODE_ENV !== 'production') {
  (window as any)._store = store;
}
